<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "etc_kg".
 *
 * @property int $id
 * @property string|null $kg_str 开关
 * @property string|null $mark 说明
 * @property int|null $status 0关闭，1开启
 */
class EtcKg extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'etc_kg';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['status'], 'integer'],
            [['kg_str', 'mark'], 'string', 'max' => 255],
            [['kg_str'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'kg_str' => Yii::t('app', '开关'),
            'mark' => Yii::t('app', '说明'),
            'status' => Yii::t('app', '0关闭，1开启'),
        ];
    }
}
